package com.xuanwei.dao.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author mjy
 * @since 2019-04-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class XwProductSku implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商品ID
     */
    private Integer productId;

    /**
     * 商品规格id拼接用"-"
     */
    private String attributeIds;

    /**
     * 商品值,用$拼接
     */
    private String attributeValues;

    /**
     * 规格编号
     */
    private String attributeNo;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 销量
     */
    private Integer saleNum;

    /**
     * 现在价格
     */
    private BigDecimal price;

    /**
     * 市场价或原价
     */
    private BigDecimal marketPrice;

    /**
     * 成本价
     */
    private BigDecimal costPrice;

    /**
     * 0上架 1下架
     */
    private  Integer status;

    @TableLogic
    private Integer deleteFlag;

    @Version
    @TableField("version")
    private Integer version;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;


}
